﻿using Core.DataAccess.Model.Project.Comment;
using Core.Framework.Model.Common;
using Core.IBusiness.IComment.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace Core.IBusiness.IComment
{
    /// <summary>
    /// 评论回复模块
    /// </summary>
    public interface ICommentReply
    {
        /// <summary>
        /// 回复评论相关操作
        /// </summary>
        /// <param name="model"></param>
        /// <param name="sqlExecType"></param>
        /// <param name="clientToken"></param>
        /// <returns></returns>
        MethodResult<int> CommentReplyExec(CommentReply model, SqlExecType sqlExecType, string clientToken);


        /// <summary>
        /// 查询评论的回复评论
        /// </summary>
        /// <param name="commentKey">评论关键字</param>
        /// <param name="pagination">分页参数</param>
        /// <param name="attributeEnums">获取属性，默认全查</param>
        /// <returns></returns>
        MethodResult<List<CommentReply>> GetCommentReply(int commentKey, Pagination pagination, List<CommentAttributeEnum> attributeEnums = null);



        /// <summary>
        /// 点赞
        /// </summary>
        /// <param name="commentKey">评论关键字</param>
        /// <param name="userKey">用户关键字</param>
        /// <param name="clientToken">客户端Token</param>
        /// <returns></returns>
        MethodResult<int> CommentReplyStar(int commentKey, int userKey, string clientToken);

        /// <summary>
        /// 取消点赞
        /// </summary>
        /// <param name="commentKey">评论关键字</param>
        /// <param name="userKey">用户关键字</param>
        /// <param name="clientToken">客户端Token</param>
        /// <returns></returns>
        MethodResult<int> CommentUnReplyStar(int commentKey, int userKey, string clientToken);
    }
}
